<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>原生开发者支持</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="description" content="DCloud 原生开发者支持网站 uni小程序SDK、App离线打包SDK、原生插件开发">
		<meta name="keywords" content="uni-app,uniapp,小程序,微信小程序,小程序解决方案,微信小程序解决方案,快应用,DCloud,混合app,app开发,hbuilder,hybrid,native,webview,unimpsdk,uni小程序,uni小程序SDK">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<link rel="shortcut icon" type="image/x-icon" href="//img-cdn-tc.dcloud.net.cn/uniapp/doc/icon.png?v=1586316635415">
		<link rel="stylesheet" href="/static/vue.css">
		<link rel="stylesheet" href="/static/index.css?v=1638964114131">
	</head>

	<body>
		<div id="app">Please wait...</div>
		<script>
			// docsify config start
			window.$docsify = {
				alias: {
					'/.*/_navbar.md': '/_navbar.md',
					'/(.*)/.*/_sidebar.md': '/$1/_sidebar.md',
					'/UniMPDocs/_sidebar.md': '/_sidebar.md',
				},
				name: 'uni-native',
				// TODO 如需提交,必须改为 history 模式
				routerMode: 'history',
				//routerMode: 'hash',
				repo: false,
				coverpage: false,
				loadSidebar: true,
				loadNavbar: true,
				auto2top: true,
				mdCache: 7200000,
				search: {
					maxAge: 7200000,
					paths: ['/AppDocs/README','/AppDocs/download/android','/AppDocs/download/ios','/AppDocs/importfeproject/android','/AppDocs/importfeproject/ios','/AppDocs/package/android','/AppDocs/package/ios','/AppDocs/usemodule/android','/AppDocs/usemodule/ios','/AppDocs/usesdk/android','/AppDocs/usesdk/ios','/','/UniMPDocs/Extension/android','/UniMPDocs/Extension/ios','/UniMPDocs/FAQ/android','/UniMPDocs/FAQ/ios','/UniMPDocs/README','/UniMPDocs/SDKDownload/android','/UniMPDocs/SDKDownload/ios','/UniMPDocs/SDKDownload/opensource','/UniMPDocs/Sample/close','/UniMPDocs/Sample/event','/UniMPDocs/Sample/menubutton','/UniMPDocs/Sample/start','/UniMPDocs/UseModule/android','/UniMPDocs/UseModule/ios','/UniMPDocs/UseSdk/android','/UniMPDocs/UseSdk/ios','/zh-cn/guide'],
					placeholder: '搜索',
					noData: '没有结果',
					depth: 6
				},
				maxLevel: 2,
				subMaxLevel: 2,
				banner: ['/case'],
				plugins: [
					function(hook, vm) {
						hook.doneEach(function() {
							switch (vm.route.path.split('/')[1]) {
								case 'AppDocs':
									console.log('match-AppDocs');
									document.title = 'App离线打包SDK'
									break;
								case 'NativePlugin':
									console.log('match-NativePlugin');
									document.title = '原生插件开发'
									break;
								default:
									console.log('match-default');
									document.title = 'uni小程序SDK'
									break;
							}
						})
						hook.afterEach(function(html) {
							var url = 'https://gitee.com/dcloud/native-docs/blob/master' + vm.route.file
							return html + '<hr align=center color=#987cb9 size=1>发现错误？想参与编辑？<a href=' + url + ' target=_blank>在 Gitee 上编辑此页面！</a>'
						})
					},
				]
			}
			// docsify config end
		</script>
		<script src="/static/docsify.js?v=1638964114131"></script>
		<script src="/static/search.js?v=1638964114131"></script>
		<script src="/static/preview.min.js?v=1586316635415"></script>
		<script src="/static/emoji.js"></script>
		<script src="/static/external-script.js"></script>
		<script src="/static/docsify-copy-code.min.js"></script>
		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "https://hm.baidu.com/hm.js?8ce50fb615e232d1ff9cf73f12c99b42";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);

				function creatPop() {
					var popTime = localStorage.getItem("popTime"),
						hasClose = localStorage.getItem("hasClose");
					var nowTime = new Date().getTime();
					if (popTime && Number(popTime) + 24 * 60 * 60 * 1000 > nowTime && hasClose === "true") {
						return;
					} else {
						localStorage.removeItem("hasClose");
						localStorage.setItem("popTime", nowTime);
					}
					var pop = document.createElement("div");
					pop.setAttribute("style",
						"width: 180px;height: 120px;position: fixed;bottom: 30px;right: 30px;z-index: 99;");
					pop.innerHTML =
						'<div id="close-pop" style="line-height: 13px;color: #000000;font-size: 28px;position: absolute;right: 0px;top: 6px;cursor:pointer;">×</div><a href="//ask.dcloud.net.cn/question/60729" target="_blank"><img width="100%" src="https://img-cdn-tc.dcloud.net.cn/static/images/uniapp_share_promotion.png"></a>';
					document.body.appendChild(pop);
					var closePop = document.querySelector("#close-pop");
					closePop.addEventListener("click", function() {
						localStorage.setItem("hasClose", "true");
						document.body.removeChild(pop);
					});
				}
				// creatPop();

				window.addEventListener("click", function(e) {
					var target = e.target;

					if (target.className === "chapter") { //左侧导航的折叠
						var chapterParent = target.parentElement;
						var summary = localStorage.getItem("summary") ? JSON.parse(localStorage.getItem(
							"summary")) : {};
						var level = chapterParent.dataset.level;
						if (chapterParent.classList.contains("close")) {
							summary[level] = false;
							chapterParent.classList.remove("close");
						} else {
							summary[level] = true;
							chapterParent.classList.add("close");
						}
						localStorage.setItem("summary", JSON.stringify(summary))
						return;
					}

					if (target.tagName === "IMG" && target.className !== "preview-img") {
						var src = target.src,
							showImg = true;
						while (target && target !== document) {
							if (target.tagName == 'A') {
								showImg = false;
								break;
							}
							target = target.parentNode
						}
						if (showImg && src) {
							var preview = new $docsify.Preview(src);
							preview.show();
							return
						}
					}
				}, true)

			})();
		</script>

	</body>

</html>
